const app = getApp()
Page({

    /**
     * 页面的初始数据
     */
    data: {
        curTap: 1,
        items: [
            {
                text: "量版美妆",
                id: 1
            },
            {
                text: "母婴儿童",
                id: 2
            },
            {
                text: "个性洗护",
                id: 3
            },
            {
                text: "健康保健",
                id: 4
            },
            {
                text: "全球发送",
                id: 5
            },
            {
                text: "零食",
                id: 6
            },
            
        ],
        scrollTop: 0,
        dataType: 1,
        dataArr: [
            { minPrice: 10, maxPrice: 22 },
            { minPrice: 2.1, maxPrice: 10 },
            { minPrice: 5.50, maxPrice: 12.1 },
            { minPrice: 99.6, maxPrice: 10 },
            { minPrice: 36, maxPrice: 40 },
            { minPrice: 4.01, maxPrice: 21 },
            { minPrice: 9.55, maxPrice: 10 },
            { minPrice: 65, maxPrice: 70 }
        ]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function (options) {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },
    onPageScroll: function (e) {
        console.log(e.scrollTop)
        let that = this;
        that.setData({
            scrollTop: e.scrollTop
        })
    },
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    },
    tapSelected: function (e) {
        let that = this;
        let curId = e.currentTarget.dataset.id;
        that.setData({
            curTap: curId
        })
    },
})